{if $bPageAdded}
<div style="padding:6px;font-size:10pt;font-weight:bold;">
{language text="Mod_Menu.menu.added"}
</div>
{/if}
{if $bIsPageEdit}
<div style="padding:6px;font-size:10pt;font-weight:bold;">
{language text="Mod_Menu.updated"}
</div>
{/if}
{if $aError}
<ul>
{foreach from=$aError item=aError}
	<li>{$aError}</li>
{/foreach}
</ul>
{/if}
<form method="post" action="{url link="admin.main.menus" action="create"}{if $aEdit.menu_id}id_{$aEdit.menu_id}/{/if}">
{if $aEdit.menu_id}
<div><input type="hidden" name="var[edit_id]" value="{$aEdit.menu_id}" /></div>
<div><input type="hidden" name="var[old_url]" value="{$aEdit.url}" /></div>
<div><input type="hidden" name="var[is_module]" value="{$aEdit.is_module}" /></div>
{/if}
<table style="width:100%;" cellpadding="4">
<tr>
	<td style="font-size:10pt;text-align:right;" class="row1">{language text="Mod_Menu.title"}:</td>
	<td class="row1"><input type="text" name="var[title_menu]" value="{$aEdit.title_menu}" size="30" maxlength="50" />
	<div style="padding:5px;">
		{language text='Mod_Menu.connect_language_package'}: 
		<select name="var[is_module]">
			<option value="0"{if !$aEdit.is_module} selected="true"{/if}>{language text='no'}</option>
			<option value="1"{if $aEdit.is_module} selected="true"{/if}>{language text='yes'}</option>
		</select>
		<div style="padding:4px;">
			(<i>{language text='Mod_Menu.use_varname'}</i>)
		</div>
	</div>
	</td>
</tr>
<tr>
	<td style="font-size:10pt;text-align:right;" class="row1">{language text="Mod_Menu.url_title"}:</td>
	<td class="row1"><input type="text" name="var[url]" value="{if $aEdit.url}{$aEdit.url}{else}http://{/if}" size="30" maxlength="250" /></td>
</tr>
<tr>
	<td style="font-size:10pt;text-align:right;" class="row1">{language text="Mod_Menu.menu_location"}:</td>
	<td class="row1">
	<select name="var[location]">
		<option value="0"{if $aEdit.location == "0"} selected="true"{/if}>{language text="Mod_Menu.main"}</option>
		<option value="1"{if $aEdit.location == "1"} selected="true"{/if}>{language text="Mod_Menu.header"}</option>
		<option value="2"{if $aEdit.location == "2"} selected="true"{/if}>{language text="Mod_Menu.footer"}</option>
	</select>
	</td>
</tr>
<tr>
	<td style="font-size:10pt;text-align:right;" class="row1">{language text="Mod_Menu.permission"}:</td>
	<td class="row1">
	<select name="var[mem_only]">
		<option value=""{if $aEdit.mem_only == ''} selected="true"{/if}>{language text="Mod_Menu.any"}</option>
		<option value="1"{if $aEdit.mem_only == '1'} selected="true"{/if}>{language text="Mod_Menu.mem_only"}</option>
		<option value="2"{if $aEdit.mem_only == '2'} selected="true"{/if}>{language text="Mod_Menu.mem_only_none"}</option>
	</select>
	</td>
</tr>
<tr>
	<td style="font-size:10pt;text-align:right;" class="row1"></td>
	<td class="row1">
		<input type="submit" value="{language text="Mod_Menu.create_menu"}" />
	</td>
</tr>
</table>
</form>